package com.gongj.rabbitboot2.hello;

import org.springframework.amqp.rabbit.annotation.Queue;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

@Component
public class HelloCustomer {

    @RabbitListener(queuesToDeclare = {@Queue(value = "hello-boot",durable = "false",autoDelete = "false")})
    public void consumptionStr(String message){
        System.out.println("消费消息：" + message);
    }

//    @RabbitListener(queuesToDeclare = {@Queue(value = "hello-boot")})
//    public void consumptionObj(PayDTO message){
//        System.out.println("消费消息：" + message);
//    }
}
